home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_361 / xcolor-lib / include_files / libraries_xcolor.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  126 lines

  1. #ifndef LIBRARIES_XCOLOR_H
  2. #define LIBRARIES_XCOLOR_H
  3.  
  4. /*
  5.     XColor.library
  6.     main include file
  7.  
  8.     © by Roger Fischlin
  9.     created 24.1.90 by Ølli
  10.     revised 26.1.90: changed request structure to correctly
  11.              reflect assembler code
  12.  
  13. */
  14.  
  15. #ifndef EXEC_LIBRARIES_H
  16. #include <exec/libraries.h>
  17. #endif
  18.  
  19. #ifndef INTUITION_INTUITION_H
  20. #include <intuition/intuition.h>
  21. #endif
  22.  
  23. #ifndef LIBRARIES_DOS_H
  24. #include <libraries/dos.h>
  25. #endif
  26.  
  27.  
  28. #define XCOLORNAME "xcolor.library"
  29. #define XC_VERSION 34
  30.  
  31. /* Library Base */
  32. struct XColorBase {
  33.     struct Library Libnode;
  34.     BPTR XCb_Seglist;
  35.     struct IntuitionBase *XCb_IntuitionBase;
  36.     struct GfxBase *XCb_GfxBase;
  37.     struct MathBase *XCb_MathBase;
  38.     struct List *XCb_List;
  39. };
  40.  
  41. /* color/colour-compatibility definitions */
  42. #define CheckColour() CheckColor()
  43. #define ColourMapAddress ColorMapAdress()
  44. #define ExchangeColours() ExchangeColors()
  45. #define CopyColours() CopyColors()
  46. #define ColourNumber() ColorNumber()
  47. #define ColourRequester() ColorRequester()
  48.  
  49. /* ColorRequester structur */
  50. #define ColourRequest ColorRequest
  51. struct ColorRequest {
  52.     struct Screen *Screen; /* screen to open into */
  53.     UBYTE TextColor,BackColor,GBorderColor,GTextColor; /* rendering colo(u)rs */
  54.     ULONG Flags; /* see definitions below */
  55.     SHORT LeftEdge,TopEdge; /* position for req window */
  56.     struct TextAttr *Font; /* which font to use */
  57.     ULONG DefaultEntries;  /* default color settings */
  58.     USHORT *DefaultColorMap;
  59.     VOID (*JMPWindow)();  /* special functions to call */
  60.     VOID (*JMPMessage)();
  61.     VOID (*JMPMode)();
  62.     VOID (*JMPDraw)();
  63.     UBYTE *ScreenTitle,*DefaultWTitle;
  64.     ULONG im_Class; /* IntuiMsg reply */
  65.     USHORT im_Code,im_Qualifier;
  66.     APTR im_IAddress;
  67.     USHORT im_MouseX,im_MouseY;
  68.     struct Window *WindowPointer; /* We present: The Window */
  69.     ULONG UndoSize; /* Let the user think about his sins */
  70.     USHORT *UndoBuffer;
  71.     USHORT Undo;
  72.     ULONG Color; /* the current colo(u)r */
  73.     ULONG MemorySize,*Memory; /* keep track of the mem */
  74.     struct NewWindow *NewWindow;
  75.     ULONG Mode;     /* the current mode */
  76.     UBYTE *WindowTitle; /* the current windowtitle */
  77.     ULONG Reserved[10]; /* set to ZERO */
  78. };
  79.  
  80. #define TextColour TextColor
  81. #define BackColour BackColor
  82. #define GBorderColour GBorderColor
  83. #define GTextColour GTextColor
  84. #define DefaultColourMap DefaultColorMap
  85. #define Colour Color
  86.  
  87.  
  88. /* Flag definitions for ColorReq-structure */
  89. #define FLAG_HSV 1
  90. #define FLAG_RGB 0
  91. #define FLAG_HEX 2
  92. #define FLAG_NORMAL 0
  93. #define FLAG_NOWINDOWDEPTH 4
  94. #define FLAG_NOWINDOWDRAG 8
  95. #define FLAG_RMBTRAP 16
  96.  
  97. /* return codes */
  98. #define CR_NOTHING 0
  99. #define CR_REMAKE 1
  100. #define CR_NEWMODE 2
  101. #define CR_EXIT 3
  102. #define CR_NEWCOLOR 4
  103. #define CR_UPDATECOLOR 5
  104. #define CR_NEWCOLOUR 4
  105. #define CR_UPDATECOLOUR 5
  106.  
  107. /* modes */
  108. #define MODE_COLOUR 0
  109. #define MODE_COLOR 0
  110. #define MODE_COPY 1
  111. #define MODE_EXCHG 2
  112. #define MODE_SPREAD 3
  113.  
  114. /* returns from ColorRequester() */
  115. #define CR_OK 0
  116. #define CR_NoMemory -1
  117. #define CR_ViewPortused -2
  118. #define CR_NoWindow -3
  119.  
  120. /* for RGBtoHSV */
  121. struct HSV {
  122.     ULONG HSV_H,HSV_S,HSV_V;
  123. };
  124.  
  125. #endif
  126.